package com.base.cn.platform.os.common.utils.user;


/**
 * @description 账户历史类型
 * @author : s.li
 * @Create Date : 2017-6-27
 */
public enum AccountHistoryType {

    SALES("消费","SALES"), // 消费，出账
    REFUND("退款","REFUND"), // 退款
    CASHLOAD("现金充值","CASHLOAD"),//现金充值
    VMLOAD("课程卡充值","VMLOAD"),//课程卡充值
    ADMINLOAD("后台充值","ADMINLOAD"),//后台充值
    ADMINREFUND("后台扣款","ADMINREFUND"),//后台扣款
    FORZEN_AMOUNT("后台冻结","FORZEN_AMOUNT"),//后台冻结
    THAW_AMOUNT("后台解冻","THAW_AMOUNT"),//后台解冻
    ATTEND("问题围观收益","ATTEND"),//问题围观收益
    SPREAD("推广收益","SPREAD"),//推广收益
    REWARD("奖金收益","REWARD"),//奖金收益
    CASH("提现","CASH"),//提现
    REFUND_CASH("回退提现","REFUND_CASH"),//回退提现
    INTEGRAL("积分兑换","INTEGRAL");//积分
    private String name;
    private String value;

    AccountHistoryType(String name,String value){
        this.name = name;
        this.value = value;
    }

    public String getName(){
        return this.name;
    }
    public void setName(String name){
        this.name = name;
    }

    public String getValue(){
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isSales() {
        switch (this) {
        case SALES:
            return true;
        default:
            return false;
        }
    }

    public boolean isRefund() {
        switch (this) {
        case REFUND:
            return true;
        default:
            return false;
        }
    }

    public boolean isLoad() {
        switch (this) {
        case CASHLOAD:
            return true;
        case VMLOAD:
            return true;
        default:
            return false;
        }
    }

}
